Extending the Functionality of Personal Web Server

Adding server-side image maps
Adding a MOS plug-in
Adding a W*API™ Adapter plug-in
Adding a CGI or ACGI application


Server-side image maps

Server-side image maps allow users to access different documents by clicking on different areas of a graphic. When a user clicks on an image which has been defined as an image map, the coordinates of the user's click are sent to the server. The server uses a special control file, called a map file, to translate the click to a URL which is sent to the user's browser.

To create a server-side image map

  1. Insert a graphic into an HTML file. Make sure that you identify the image as an image map by using the ISMAP keyword and enclose it by an HREF referencing a map file located on the server. For example

    <a href="mapeg.map"><img src="mapeg.gif" ismap></a>
    Note that the map file (mapeg.map in the example) must have a .map extension.

  2. Use a text-editor to create the map file. The format of the map file follows the CERN convention for map files.

    The CERN convention divides the graphic into a series of non-overlapping geometric shapes. Here's an example

    # a comment
    default http://PWS.microsoft.com/demo/map/default.htm
    rect 215,50 258,168 http://PWS.microsoft.com/demo/map/green.htm
    rect 20,8 104,65 http://PWS.microsoft.com/demo/map/red.htm
    poly 14,117 42,117 60,88 75,118 101,118 81,130 94,166 55,144 14,163 32,131 32,131 http://PWS.microsoft.com/demo/map/yellow.htm
    point 172,30 http://PWS.microsoft.com/demo/map/point.htm
    circle 150,97 31 http://PWS.microsoft.com/demo/map/blue.htm
    

    The server uses the following rules to translate the coordinates of the user's click into a URL.

    1. Lines that begin with a number sign (#) are ignored.
    2. The rectangle shape is defined by the coordinates of its top-left and bottom-right corner. The first value is the x (horizontal) coordinate and the second is the y (vertical) coordinate.
    3. The circle shape is defined by its center coordinate and radius.
    4. The polygon shape is defined by the coordinates of its vertices. A polygon must have three or more vertices.
    5. If the user clicks inside a circle, rectangle or polygon shape, the associated URL is returned.
    6. If the click is not inside a circle, rectangle or polygon shape, the server evaluates any point shapes. If one or more point shapes are defined, the URL associated with the closest point is returned. Point shapes are useful for defining locations on geographic maps.
    7. If the click is not inside a circle, rectangle or polygon shape and no point shapes have been defined, the server returns the value of the default URL.

Return to top

To add a MOS plug-in to your site

  1. Drag the plug-in icon into the Server Plug-ins folder. (The Server Plug-ins folder is located in the PWS folder in the MS Internet folder inside your System folder).
  2. Configure the plug-in following the instructions provided by the plug-in vendor. Some plug-ins use a standard HTML browser for configuration, while others may not require any configuration.
Tips

Note

Related Topic
Using the W*API Adapter Plug-in

Return to top

To use the W*API Adapter Plug-in

  1. Personal Web Server includes a beta version of the W*API Adapter Plug-in. Personal Web Server stores the plug-in the Extra subfolder located in the Personal Web Server folder.
  2. Drag the W*API Adapter plug-in into the Server Plug-ins folder. (The Server Plug-ins folder is located in the PWS folder in the MS Internet folder inside your System folder).
  3. Drag any W*API plug-in into the Server Plug-ins folder.
  4. Open the Microsoft Personal Web Server control panel.
  5. Click the Web site button.
  6. Stop and restart publishing.
  7. Configure the plug-in following the instructions provided by the plug-in vendor. Some plug-ins use a standard HTML browser for configuration, while others may not require any configuration.
Notes

Tip

Related Topics
Opening the Microsoft Personal Web Server control panel
Publishing documents
Stopping the publishing of documents from the Microsoft Personal Web Server control panel
Stopping the publishing of documents from your Web site

Return to top

To add a CGI or ACGI application to your site

  1. Make sure the application ends with the appropriate file name extension. If you are adding an older CGI that can only handle one request at a time, the CGI's file name must end with .cgi. If you are adding an ACGI, the file name should end with .acgi.
  2. Place the CGI or ACGI application into the folder that you are publishing. The CGI or ACGI may reside anywhere in the published folder or sub-folders.
  3. Configure the CGI or ACGI following the instructions provided by the vendor. Some CGIs and ACGIs do not require any configuration. Others are configured by double-clicking the CGI or ACGI, or by using a special configuration application.
  4. Modify the documents on your Web site to use the CGI or ACGI. Some CGIs and ACGIs can be configured to work with documents that have a specific file extension such as ".fcgi". In this case, consult the CGI documentation for the correct file extension. Other CGIs and ACGIs are triggered by specifying the name of the CGI or ACGI in the URL of a request. In this case, add links to the URL of the CGI or ACGI in your Web pages. Make sure the URL includes the full filename, including the ".cgi" or ".acgi" file extension. When these links are followed the, the CGI or ACGI will be triggered.

Notes

Return to top